package com.shuiyun.dao;

import com.shuiyun.entity.Goods;
import com.shuiyun.entity.GoodsExample;
import java.util.List;
import com.shuiyun.utils.Query;
import org.apache.ibatis.annotations.Param;

public interface GoodsMapper {
    int countByExample(GoodsExample example);

    int deleteByExample(GoodsExample example);

    int deleteByPrimaryKey(Integer goodsId);

    int insert(Goods record);

    int insertSelective(Goods record);

    List<Goods> selectByExample(GoodsExample example);

    Goods selectByPrimaryKey(Integer goodsId);

    int updateByExampleSelective(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExample(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);

    //分页查询货物
    List<Goods> findAllGoodsByPage(Query query);

    //记录的总条数
    long countGoods();

    //根据id查找货物
    Goods findGoodsById(Integer goodsId);

    //更新货物
    int updateGoods(Goods goods);

    //批量删除货物
    int deleteBatch(Integer[] ids);
}